home *** CD-ROM | disk | FTP | other *** search
- Path: isonews.bbn.hp.com!hpbblb!news
- From: Matthias Dittrich <matti>
- Newsgroups: comp.lang.c
- Subject: Re: Type casting
- Date: 26 Feb 1996 07:20:35 GMT
- Organization: Hewlett-Packard Co.
- Message-ID: <4grn03$2mv@hpbblb.bbn.hp.com>
- References: <3127dd4f.19010083@news.planet.net> <3127FF7A.6442C3B8@eden.com> <4gfnj1$gsc@calvin.risq.qc.ca>
- NNTP-Posting-Host: trabant.bbn.hp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; HP-UX A.09.07 9000/712)
- X-URL: news:4gfnj1$gsc@calvin.risq.qc.ca
-
- It's a rounding problem. The cast only truncates your float number. If it
- is not exactly 254 or a little bit more, the result is 253. Rounding is
- discussed in one or two threads currently in this news group.
-
- Good luck,
- Matthias
-
-